<!DOCTYPE html>
<html lang="en">
<head>

    <meta charset="UTF-8">
    <script type="text/javascript" src="assets/jwplayer.min.js"></script>
    <title>Rendering Modes</title>
    <link type="text/css" rel="stylesheet" href="assets/style.css" />

</head>
<body>

<h2>Rendering Modes</h2>

<div id="player"></div>
<script type="text/javascript">


function loadPlayer(html5first,multitrack) {
    var key = 'bkaovAYt';
    var cap = {file:'assets/bunny-eng.txt'};
    if(multitrack) { 
        key = '3XnJSIm4'; 
        cap = {files:'assets/sintel-ch.srt,assets/sintel-fa.srt,assets/sintel-gr.srt,assets/sintel-jp.srt,assets/sintel-ko.srt,assets/sintel-pl.srt,assets/sintel-ru.srt,assets/sintel-sp.srt,assets/sintel-tr.srt',labels:'Chinese,Farsi,Greek,Japanese,Korean,Polish,Russian,Spanish,Turkish',back:true};
    }
    var options = {
        image: 'http://content.bitsontherun.com/thumbs/'+key+'-720.jpg',
        height: 300,
        levels: [
            { file: 'http://content.bitsontherun.com/videos/'+key+'-injeKYZS.mp4' },
            { file: 'http://content.bitsontherun.com/videos/'+key+'-27m5HpIu.webm' }
        ],
        plugins: {
            '../captions.js': cap
        },
        width: 640
    };
    var html5 = {
        type: 'html5'
    }
    var flash = { 
        type: 'flash',
        src: 'assets/player.swf'
    }
    if(html5first) {
        options.modes = [html5,flash];
    } else { 
        options.modes = [flash,html5];
    }
    jwplayer("player").setup(options);
};
</script>


<ul>
    <li><a href="javascript:loadPlayer(true,false)">HTML5 first, single track</a></li>
    <li><a href="javascript:loadPlayer(false,false)">Flash first, single track</a></li>
    <li><a href="javascript:loadPlayer(true,true)">HTML5 first, multitrack</a></li>
    <li><a href="javascript:loadPlayer(false,true)">Flash first, multitrack</a></li>
</ul>

<p>Check if the plugin works correctly in both rendering modes, using IE9, Firefox, Safari, Chrome.<br/>
Check if both the captions and dock button are omitted on iPad, iPhone and Android/HTML5.</p>


</body>
</html>